/* *****************************************************************************
*
*	danizone.ch
*
*	Developer:		mda010
*	Creation date:	May 6, 2012 8:14:46 PM
*	
*	Project name:	HomegrownCuisine
*	File name:		Recipe.java
*
*	Copyrights (C) 2012 @danizone.ch
*
*   This program is free software; you can redistribute it and/or modify
*	it under the terms of the GNU General Public License as published by
*	the Free Software Foundation; either version 2 of the License, or
*	(at your option) any later version.
*
*	This program is distributed in the hope that it will be useful,
*	but WITHOUT ANY WARRANTY; without even the implied warranty of
*	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*	GNU General Public License for more details.
*
*	Change history:	[developer]; [date];[reason for change]
*
*					mda010; May 6, 2012; created
*
***************************************************************************** */
package ch.zhaw.hgc.entities;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Lob;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import ch.zhaw.hgc.entities.base.AbstractEntity;

/**
 * Implementation note goes here!
 */
@Entity
public class Recipe extends AbstractEntity{

	private static final long serialVersionUID = 1L;

	@Size(min=3, max=35, message="Title is mandatory and consist of at least 3 and max 35 characters!")
	private String title;
	
	@NotNull(message="Author is mandatory!")
	private String author;
	
	@NotNull(message="Ingridients are mandatory!")
	private String ingredients;
	
	@NotNull
	private String portions;
	
	@NotNull
	private String preparationTimeHours;
	
	@NotNull
	private String preparationTimeMin;
	
	@NotNull
	private String preparationSteps;
	
	private String wineProposal;
	
	private String sideDish;
	
	@Lob
	@Basic(fetch=FetchType.EAGER)
	private byte[] recipeImage;
		
	private String category;
		
	private String season;

	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the author
	 */
	public String getAuthor() {
		return author;
	}

	/**
	 * @param author the author to set
	 */
	public void setAuthor(String author) {
		this.author = author;
	}

	/**
	 * @return the ingredients
	 */
	public String getIngredients() {
		return ingredients;
	}

	/**
	 * @param ingredients the ingredients to set
	 */
	public void setIngredients(String ingredients) {
		this.ingredients = ingredients;
	}

	
	/**
	 * @return the portions
	 */
	public String getPortions() {
		return portions;
	}
	/**
	 * @param portions the portions to set
	 */
	public void setPortions(String portions) {
		this.portions = portions;
	}

	/**
	 * @return the preparationTimeHours
	 */
	public String getPreparationTimeHours() {
		return preparationTimeHours;
	}
	/**
	 * @param preparationTimeHours the preparationTimeHours to set
	 */
	public void setPreparationTimeHours(String preparationTimeHours) {
		this.preparationTimeHours = preparationTimeHours;
	}

	/**
	 * @return the preparationTimeMin
	 */
	public String getPreparationTimeMin() {
		return preparationTimeMin;
	}
	/**
	 * @param preparationTimeMin the preparationTimeMin to set
	 */
	public void setPreparationTimeMin(String preparationTimeMin) {
		this.preparationTimeMin = preparationTimeMin;
	}

	/**
	 * @return the wineProposal
	 */
	public String getWineProposal() {
		return wineProposal;
	}

	/**
	 * @param wineProposal the wineProposal to set
	 */
	public void setWineProposal(String wineProposal) {
		this.wineProposal = wineProposal;
	}

	/**
	 * @return the sideDish
	 */
	public String getSideDish() {
		return sideDish;
	}

	/**
	 * @param sideDish the sideDish to set
	 */
	public void setSideDish(String sideDish) {
		this.sideDish = sideDish;
	}

	/**
	 * @return the recipeImage
	 */
	public byte[] getRecipeImage() {
		return recipeImage;
	}

	/**
	 * @param recipeImage the recipeImage to set
	 */
	public void setRecipeImage(byte[] recipeImage) {
		this.recipeImage = recipeImage;
	}

	/**
	 * @return the preparationSteps
	 */
	public String getPreparationSteps() {
		return preparationSteps;
	}

	/**
	 * @param preparationSteps the preparationSteps to set
	 */
	public void setPreparationSteps(String preparationSteps) {
		this.preparationSteps = preparationSteps;
	}

	/**
	 * @return the category
	 */
	public String getCategory() {
		return category;
	}

	/**
	 * @param category the category to set
	 */
	public void setCategory(String category) {
		this.category = category;
	}

	/**
	 * @return the season
	 */
	public String getSeason() {
		return season;
	}

	/**
	 * @param season the season to set
	 */
	public void setSeason(String season) {
		this.season = season;
	}
}